export default (axios) => {
    return ({
        getQueues: getQueues(axios),
        submitPreorder: submitPreorder(axios),
        getPreorderDetail: getPreorderDetail(axios),
        resetPreorder: resetPreorder(axios),
        refund: refund(axios)
    });
};

const getQueues = (axios) => () => {
    return axios.get(`/app/vaccine/queue/list`);
}

const submitPreorder = (axios) => (data={}) => {
    return axios.post(`/app/vaccine/record/submitQueue`, data);
}

const getPreorderDetail = (axios) => recordId => {
    return axios.get(`/app/vaccine/record/detail?recordId=${recordId}`);
}

const resetPreorder = (axios) => data => {
    return axios.post(`/app/vaccine/record/resetRecord`, data);
}

const refund = (axios) => data => {
    return axios.post(`/app/vaccine/record/prepayRefund`, data);
}

